DefaultControlView : BaseControlView{
	
	
	var c, r, randName, col, cols, row1Height, v, dataSlider, feedbackWidget, pluginButton;
	
	subInit{

		
		
		SCStaticText(container, Rect(0,0,100,15)).string_(name);
		
		
		c = SCSlider( container, Rect(0,20,100,15) );
		dataSlider = c;
		c.background_(RippleGuiConstants.getShadeColor);
		c.canFocus = false;
		
		
		c = SCMultiSliderView(container, Rect(0,37,100,4));
		feedbackWidget = c;
		c.value_([0]);
		c.indexIsHorizontal_(false);
		c.isFilled_(true);
		c.background_(RippleGuiConstants.getShadeColor);
		c.fillColor_(RippleGuiConstants.getDarkerShadeColor);
		c.strokeColor_(RippleGuiConstants.getDarkerShadeColor);
		c.valueThumbSize_(1);

		
		SCStaticText(container, Rect(110,0,100,15)).string_('rand');
		
		
		
		r = Knob.new(container, Rect(113, 17, 20, 20));
		r.canFocus = false;
		r.color =  [RippleGuiConstants.getDarkerShadeColor,  RippleGuiConstants.getDarkerShadeColor, RippleGuiConstants.getShadeColor, Color.black];
		

		
		
		v = SCButton(container,Rect(150, 18, 55, 20));
		pluginButton = v;
		v.states = [
			["plugins",Color.white, RippleGuiConstants.getDarkerShadeColor]
		];
		v.canFocus = false;
		
	}
	
	createActions{|target|
			this.action_({|obj| target.setControlValue(name, obj.value, nil)});		
			this.randBoxAction_({arg numb; target.setControlValue(name, numb.value, \Rand);});
			this.pluginButtonAction_({target.displayPluginGui(name)});
	}
	
	createControlMapEntries{|map|
			map.put(name, ControlValueSetter(this));
			map.put((name ++ "Feedback").asSymbol, FeedbackValueSetter.new(this));
			map.put((name.asString ++ "Rand").asSymbol, RandValueSetter.new(this));
			map.put((name.asString ++ "PluginButton").asSymbol, PluginButtonSetter.new(pluginButton));									
	}
	
	action_{|fn|
		dataSlider.action_(fn);	
	}
	
	randBoxAction_{|fn|
		r.action_(fn);
	}
	
	pluginButtonAction_{|fn|
		pluginButton.action_(fn);	
	}
	
	value_{|val|
		dataSlider.value_(val);
	}
	
	feedBackValue_{|val|
		if(feedbackWidget.notClosed){
			feedbackWidget.value_(val);	
		}
	}
	
	randBoxValue_{|val|
		r.value_(val);	
	}
	
}
